package ysgrpc

import (
	"context"
	"gitee.com/kmyss/gf-ex/yscmd"
)

type FlagPubSizeBuilder struct {
	yscmd.FlagBuilderCore
}

func (b *FlagPubSizeBuilder) Init(ctx context.Context, group ...string) {
	b.FlagBuilderCore.Init(ctx, group...)
	b.F.ConfigNodeName = CONFIG_NODE_NAME
	b.F.Long = "pub-size"
	b.F.Description = `
        MQ GRPC PUB 时的分隔大小`
	b.F.DefaultValue = 3 * 1024 * 1024
}

func FlagPubSize(ctx context.Context, group ...string) *yscmd.Flag {
	build := &FlagPubSizeBuilder{}
	build.Init(ctx, group...)
	return build.Flag()
}
